{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Help on package selenium:\n",
      "\n",
      "NAME\n",
      "    selenium\n",
      "\n",
      "DESCRIPTION\n",
      "    # Licensed to the Software Freedom Conservancy (SFC) under one\n",
      "    # or more contributor license agreements.  See the NOTICE file\n",
      "    # distributed with this work for additional information\n",
      "    # regarding copyright ownership.  The SFC licenses this file\n",
      "    # to you under the Apache License, Version 2.0 (the\n",
      "    # \"License\"); you may not use this file except in compliance\n",
      "    # with the License.  You may obtain a copy of the License at\n",
      "    #\n",
      "    #   http://www.apache.org/licenses/LICENSE-2.0\n",
      "    #\n",
      "    # Unless required by applicable law or agreed to in writing,\n",
      "    # software distributed under the License is distributed on an\n",
      "    # \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n",
      "    # KIND, either express or implied.  See the License for the\n",
      "    # specific language governing permissions and limitations\n",
      "    # under the License.\n",
      "\n",
      "PACKAGE CONTENTS\n",
      "    common (package)\n",
      "    webdriver (package)\n",
      "\n",
      "VERSION\n",
      "    3.141.0\n",
      "\n",
      "FILE\n",
      "    c:\\users\\92519\\anaconda3\\lib\\site-packages\\selenium\\__init__.py\n",
      "\n",
      "\n"
     ]
    }
   ],
   "source": [
    "import selenium\n",
    "help(selenium)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# 调用模块"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 18,
   "metadata": {},
   "outputs": [],
   "source": [
    "import pandas as pd\n",
    "import time\n",
    "import numpy as np\n",
    "from lxml.html import fromstring\n",
    "import time\n",
    "from random import random"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [],
   "source": [
    "# coding=utf-8\n",
    "from selenium import webdriver\n",
    "import time\n",
    "\n",
    "wd = webdriver.Chrome()\n",
    "wd.get(\"https://www.baidu.com\")    # 打开百度浏览器\n",
    "wd.find_element_by_id(\"kw\").send_keys(\"selenium\")   # 定位输入框并输入关键字\n",
    "wd.find_element_by_id(\"su\").click()   #点击[百度一下]搜索\n",
    "time.sleep(3)   #等待3秒\n",
    "wd.quit()   #关闭浏览器"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# 打开浏览器"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {},
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "<ipython-input-4-783dcc5c7ea8>:19: DeprecationWarning: use options instead of chrome_options\n",
      "  driver = webdriver.Chrome( chrome_options = opts) #desired_capabilities=caps,\n"
     ]
    }
   ],
   "source": [
    "from selenium import webdriver\n",
    "from selenium.webdriver.common.desired_capabilities import DesiredCapabilities\n",
    "\n",
    "\n",
    "#caps=dict()\n",
    "#caps[\"pageLoadStrategy\"] = \"none\"   # Do not wait for full page load\n",
    "\n",
    "opts = webdriver.ChromeOptions()\n",
    "opts.add_argument('--no-sandbox')#解决DevToolsActivePort文件不存在的报错\n",
    "opts.add_argument('window-size=1920x3000') #指定浏览器分辨率\n",
    "opts.add_argument('--disable-gpu') #谷歌文档提到需要加上一这个属性来规避bug\n",
    "opts.add_argument('--hide-scrollbars') #隐藏滚动条, 应对些特殊页面\n",
    "#opts.add_argument('blink-settings=imagesEnabled=false') #不加载图片, 提升速度\n",
    "#opts.add_argument('--headless') #浏览器不提供可视化页面. linux下如果系统不支持可视化不加这条会启动失败\n",
    "# opts.binary_location = \"C:\\portable\\PortableApps\\IronPortable\\App\\Iron\\chrome.exe\"\n",
    "# opts.binary_location = \"C:\\Program Files (x86)\\Google\\Chrome\\Application\\chromedriver.exe\" #\"H:\\_coding_\\Gitee\\InternetNewMedia\\CapstonePrj2016\\chromedriver.exe\"  \n",
    "\n",
    "# \"H:\\_coding_\\Gitee\\InternetNewMedia\\CapstonePrj2016\\chromedriver.exe\"  \n",
    "driver = webdriver.Chrome( chrome_options = opts) #desired_capabilities=caps,"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# 打开知网并进行自动化爬取"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {},
   "outputs": [],
   "source": [
    "driver.get(\"https://www.cnki.net/\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {},
   "outputs": [],
   "source": [
    "# 点击高级检索\n",
    "element = driver.find_element_by_xpath('//*[@id=\"highSearch\"]')\n",
    "element.click()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "'CDwindow-5188DA235A5F190DDF225683888012A9'"
      ]
     },
     "execution_count": 7,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "#检查窗口位置\n",
    "driver.current_window_handle"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {},
   "outputs": [],
   "source": [
    "# 切换到新页面 \n",
    "driver.switch_to.window(driver.window_handles[1])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 19,
   "metadata": {},
   "outputs": [],
   "source": [
    "# 选择期刊\n",
    "element = driver.find_element_by_xpath('/html/body/div[3]/div[1]/div/ul[1]/li[1]/a/span')\n",
    "element.click()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 20,
   "metadata": {},
   "outputs": [],
   "source": [
    "# 输入搜索内容\n",
    "driver.find_element_by_xpath('//*[@id=\"gradetxt\"]/dd[1]/div[2]/input').send_keys(\"大数据新媒体\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 22,
   "metadata": {
    "scrolled": true
   },
   "outputs": [],
   "source": [
    "# element = driver.find_element_by_xpath('/html/body/div[4]/div/div[2]/div/div[1]/div[1]/div[2]/div[2]/input')\n",
    "# element.click()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 48,
   "metadata": {},
   "outputs": [],
   "source": [
    "# element = driver.find_element_by_xpath('/html/body/div[4]/div/div[2]/div/div[2]/a[2]')\n",
    "# element.click()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 55,
   "metadata": {},
   "outputs": [],
   "source": [
    "#勾选来源类别"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 93,
   "metadata": {},
   "outputs": [],
   "source": [
    "element = driver.find_element_by_xpath('/html/body/div[2]/div/div[2]/div/div[1]/div[1]/div[2]/div[1]/div[3]/div/label[4]/input')\n",
    "element.click()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 94,
   "metadata": {},
   "outputs": [],
   "source": [
    "element = driver.find_element_by_xpath('/html/body/div[2]/div/div[2]/div/div[1]/div[1]/div[2]/div[1]/div[3]/div/label[3]/input')\n",
    "element.click()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 95,
   "metadata": {},
   "outputs": [],
   "source": [
    "element = driver.find_element_by_xpath('/html/body/div[2]/div/div[2]/div/div[1]/div[1]/div[2]/div[1]/div[3]/div/label[2]/input')\n",
    "element.click()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 96,
   "metadata": {},
   "outputs": [],
   "source": [
    "element = driver.find_element_by_xpath('/html/body/div[2]/div/div[2]/div/div[1]/div[1]/div[2]/div[1]/div[3]/div/label[5]/input')\n",
    "element.click()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "#填写query\n",
    "*可以在高级检索直接检索\n",
    "*"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "metadata": {},
   "outputs": [],
   "source": [
    "# 点专业检索\n",
    "element = driver.find_element_by_xpath('/html/body/div[2]/div/div[2]/ul/li[4]')\n",
    "element.click()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "metadata": {},
   "outputs": [],
   "source": [
    "# AI_新媒体_query = '(SU=\"新媒体\" and SU=\"人工智能\") OR (SU=\"AI\" and SU=\"新媒体\")'\n",
    "AI_新媒体_query = '(SU=\"新媒体\")'"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "metadata": {},
   "outputs": [],
   "source": [
    "element = driver.find_element_by_xpath('/html/body/div[2]/div/div[2]/div/div[1]/div[1]/div[2]/textarea')\n",
    "element.clear()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "metadata": {},
   "outputs": [],
   "source": [
    "element = driver.find_element_by_xpath('/html/body/div[2]/div/div[2]/div/div[1]/div[1]/div[2]/textarea').send_keys(AI_新媒体_query)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 13,
   "metadata": {},
   "outputs": [],
   "source": [
    "element = driver.find_element_by_xpath('/html/body/div[2]/div/div[2]/div/div[1]/div[1]/div[2]/div[2]/input')\n",
    "element.click()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 14,
   "metadata": {},
   "outputs": [],
   "source": [
    "#50\n",
    "element = driver.find_element_by_xpath('/html/body/div[3]/div[2]/div[2]/div[2]/form/div/div[1]/div[2]/div[2]/div/div/div/i')\n",
    "element.click()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 15,
   "metadata": {},
   "outputs": [],
   "source": [
    "element = driver.find_element_by_xpath('/html/body/div[3]/div[2]/div[2]/div[2]/form/div/div[1]/div[2]/div[2]/div/div/ul/li[3]/a')\n",
    "element.click()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 17,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>Unnamed: 0</th>\n",
       "      <th>题名</th>\n",
       "      <th>作者</th>\n",
       "      <th>来源</th>\n",
       "      <th>发表时间</th>\n",
       "      <th>数据库</th>\n",
       "      <th>被引</th>\n",
       "      <th>下载</th>\n",
       "      <th>操作</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>1</td>\n",
       "      <td>新媒体环境下和谐医患关系的构建</td>\n",
       "      <td>宋佳; 徐睿</td>\n",
       "      <td>现代商贸工业</td>\n",
       "      <td>2021-06-12</td>\n",
       "      <td>期刊</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>下载</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>2</td>\n",
       "      <td>传统文化元素融入品牌设计带来的价值提升研究</td>\n",
       "      <td>邹云; 李桢</td>\n",
       "      <td>今古文创</td>\n",
       "      <td>2021-06-12</td>\n",
       "      <td>期刊</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>下载</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>3</td>\n",
       "      <td>创新教育管理模式 提高体育教学质量——评《高校体育教学管理改革与模式构建》 网络首发</td>\n",
       "      <td>杜晓兵</td>\n",
       "      <td>山西财经大学学报</td>\n",
       "      <td>2021-06-11 16:24</td>\n",
       "      <td>期刊</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>下载</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>4</td>\n",
       "      <td>基于个案学院学生党员主体意识培养的若干思考</td>\n",
       "      <td>沈耀</td>\n",
       "      <td>党史博采(下)</td>\n",
       "      <td>2021-06-11</td>\n",
       "      <td>期刊</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>下载</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>5</td>\n",
       "      <td>打造新媒体思政教育干部队伍 提升高校党建和思政教育工作成效</td>\n",
       "      <td>刘里卿</td>\n",
       "      <td>党史博采(下)</td>\n",
       "      <td>2021-06-11</td>\n",
       "      <td>期刊</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>下载</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>6</td>\n",
       "      <td>文化哲学视域下高校文化育人路径探索——基于00后大学生群体特点</td>\n",
       "      <td>邓菁菁</td>\n",
       "      <td>黑龙江教育(高教研究与评估)</td>\n",
       "      <td>2021-06-11</td>\n",
       "      <td>期刊</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>下载</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>7</td>\n",
       "      <td>新媒体促进少先队员政治启蒙路径研究</td>\n",
       "      <td>王丽娟</td>\n",
       "      <td>少年儿童研究</td>\n",
       "      <td>2021-06-11</td>\n",
       "      <td>期刊</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>下载</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>8</td>\n",
       "      <td>海南建设自由贸易港进程中维护意识形态安全的路径研究</td>\n",
       "      <td>张北斗; 马文广</td>\n",
       "      <td>现代商贸工业</td>\n",
       "      <td>2021-06-11</td>\n",
       "      <td>期刊</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>下载</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8</th>\n",
       "      <td>9</td>\n",
       "      <td>“互联网+”背景下新媒体短视频对英语口语学习的影响研究——以抖音短视频为例</td>\n",
       "      <td>邵玉杰; 关淼; 王琦</td>\n",
       "      <td>现代商贸工业</td>\n",
       "      <td>2021-06-11</td>\n",
       "      <td>期刊</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>下载</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>9</th>\n",
       "      <td>10</td>\n",
       "      <td>新媒体环境下高校思想政治教育与学校体育多元发展研究</td>\n",
       "      <td>李佩明</td>\n",
       "      <td>现代商贸工业</td>\n",
       "      <td>2021-06-11</td>\n",
       "      <td>期刊</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>下载</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>10</th>\n",
       "      <td>11</td>\n",
       "      <td>中职校企合作“课堂-工作室-实训基地”三位一体教学模式的研究与实践</td>\n",
       "      <td>李景娟; 张玉燕</td>\n",
       "      <td>现代商贸工业</td>\n",
       "      <td>2021-06-11</td>\n",
       "      <td>期刊</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>下载</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>11</th>\n",
       "      <td>12</td>\n",
       "      <td>新媒体时代高校辅导员学生管理方法创新</td>\n",
       "      <td>刘芳源; 韩斌</td>\n",
       "      <td>学周刊</td>\n",
       "      <td>2021-06-11</td>\n",
       "      <td>期刊</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>下载</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>12</th>\n",
       "      <td>13</td>\n",
       "      <td>新冠疫情影响下高校招生宣传工作的应对之策</td>\n",
       "      <td>冯杰梅</td>\n",
       "      <td>北京教育(高教)</td>\n",
       "      <td>2021-06-10</td>\n",
       "      <td>期刊</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>下载</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>13</th>\n",
       "      <td>14</td>\n",
       "      <td>高校大学生“宅”背景下思想政治教育工作开展方法的思考</td>\n",
       "      <td>陈阿娣</td>\n",
       "      <td>科学咨询(教育科研)</td>\n",
       "      <td>2021-06-10</td>\n",
       "      <td>期刊</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>下载</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>14</th>\n",
       "      <td>15</td>\n",
       "      <td>新媒体视域下的高校图书馆信息服务——评《高校图书馆读者服务工作拓展与创新》</td>\n",
       "      <td>袁声莉; 徐玲</td>\n",
       "      <td>中国教育学刊</td>\n",
       "      <td>2021-06-10</td>\n",
       "      <td>期刊</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>下载</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>15</th>\n",
       "      <td>16</td>\n",
       "      <td>打破健康传播中的“无形之墙”——宿命论信念和信息传播对疫情中公众防护行为倾向的影响研究</td>\n",
       "      <td>黎藜; 李孟</td>\n",
       "      <td>传媒观察</td>\n",
       "      <td>2021-06-10</td>\n",
       "      <td>期刊</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>下载</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>16</th>\n",
       "      <td>17</td>\n",
       "      <td>深度融合，探索“媒体+”的无限可能</td>\n",
       "      <td>姜圣瑜; 刘晓来</td>\n",
       "      <td>传媒观察</td>\n",
       "      <td>2021-06-10</td>\n",
       "      <td>期刊</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>下载</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>17</th>\n",
       "      <td>18</td>\n",
       "      <td>新媒体时代大学生社会主义核心价值观培育途径创新研究</td>\n",
       "      <td>辛勤</td>\n",
       "      <td>佳木斯大学社会科学学报</td>\n",
       "      <td>2021-06-10</td>\n",
       "      <td>期刊</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>下载</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>18</th>\n",
       "      <td>19</td>\n",
       "      <td>智慧课堂下课程思政体系建设的“三全育人”理性审视</td>\n",
       "      <td>刘严; 黄波</td>\n",
       "      <td>佳木斯大学社会科学学报</td>\n",
       "      <td>2021-06-10</td>\n",
       "      <td>期刊</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>下载</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>19</th>\n",
       "      <td>20</td>\n",
       "      <td>元媒介视角下新媒体评价分享功能的影响研究</td>\n",
       "      <td>宋佳欣</td>\n",
       "      <td>文化产业</td>\n",
       "      <td>2021-06-10</td>\n",
       "      <td>期刊</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>下载</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20</th>\n",
       "      <td>21</td>\n",
       "      <td>新媒体下平阳木版年画动态视觉化探究</td>\n",
       "      <td>朱烨</td>\n",
       "      <td>文化产业</td>\n",
       "      <td>2021-06-10</td>\n",
       "      <td>期刊</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>下载</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>21</th>\n",
       "      <td>22</td>\n",
       "      <td>媒体融合背景下新闻宣传工作方式思考</td>\n",
       "      <td>张东波</td>\n",
       "      <td>文化产业</td>\n",
       "      <td>2021-06-10</td>\n",
       "      <td>期刊</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>下载</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>22</th>\n",
       "      <td>23</td>\n",
       "      <td>基于新媒体的校园文化建设</td>\n",
       "      <td>赵佳滨</td>\n",
       "      <td>文化产业</td>\n",
       "      <td>2021-06-10</td>\n",
       "      <td>期刊</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>下载</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>23</th>\n",
       "      <td>24</td>\n",
       "      <td>“互联网+”背景下图书出版与新媒体融合发展的路径探析</td>\n",
       "      <td>刘芳</td>\n",
       "      <td>文化产业</td>\n",
       "      <td>2021-06-10</td>\n",
       "      <td>期刊</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>下载</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>24</th>\n",
       "      <td>25</td>\n",
       "      <td>新媒体视域下高校统战宣传工作的守正创新</td>\n",
       "      <td>于喜彬; 程靖涵</td>\n",
       "      <td>发明与创新(职业教育)</td>\n",
       "      <td>2021-06-10</td>\n",
       "      <td>期刊</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>下载</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>25</th>\n",
       "      <td>26</td>\n",
       "      <td>高校辅导员融媒体思政育人模式探究</td>\n",
       "      <td>赵萌</td>\n",
       "      <td>发明与创新(职业教育)</td>\n",
       "      <td>2021-06-10</td>\n",
       "      <td>期刊</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>下载</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>26</th>\n",
       "      <td>27</td>\n",
       "      <td>新媒体背景下高校辅导员与学生进行有效沟通方式探究</td>\n",
       "      <td>李雪婷</td>\n",
       "      <td>发明与创新(职业教育)</td>\n",
       "      <td>2021-06-10</td>\n",
       "      <td>期刊</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>下载</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>27</th>\n",
       "      <td>28</td>\n",
       "      <td>新媒体环境下田径运动的可持续发展</td>\n",
       "      <td>吴小铭</td>\n",
       "      <td>体育风尚</td>\n",
       "      <td>2021-06-10</td>\n",
       "      <td>期刊</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>下载</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>28</th>\n",
       "      <td>29</td>\n",
       "      <td>“文学经典，怎样影响你的人生”</td>\n",
       "      <td>NaN</td>\n",
       "      <td>北京文学(精彩阅读)</td>\n",
       "      <td>2021-06-10</td>\n",
       "      <td>期刊</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>下载</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>29</th>\n",
       "      <td>30</td>\n",
       "      <td>新媒体时代杨家埠木版年画的价值建构与传播创新</td>\n",
       "      <td>王静; 于师号</td>\n",
       "      <td>芒种</td>\n",
       "      <td>2021-06-10</td>\n",
       "      <td>期刊</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>下载</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>30</th>\n",
       "      <td>31</td>\n",
       "      <td>谈新媒体环境下初中体育精神文化素养提升策略</td>\n",
       "      <td>周磊</td>\n",
       "      <td>体育风尚</td>\n",
       "      <td>2021-06-10</td>\n",
       "      <td>期刊</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>下载</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>31</th>\n",
       "      <td>32</td>\n",
       "      <td>新媒体时代下高职院校体育文化建设发展的路径分析</td>\n",
       "      <td>陈岳</td>\n",
       "      <td>体育风尚</td>\n",
       "      <td>2021-06-10</td>\n",
       "      <td>期刊</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>下载</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>32</th>\n",
       "      <td>33</td>\n",
       "      <td>新媒体背景下企业视频营销技能提升策略</td>\n",
       "      <td>杨晓飞</td>\n",
       "      <td>今日财富(中国知识产权)</td>\n",
       "      <td>2021-06-10</td>\n",
       "      <td>期刊</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>下载</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>33</th>\n",
       "      <td>34</td>\n",
       "      <td>5G时代下的群众文化活动传播推广思考</td>\n",
       "      <td>王雅慧</td>\n",
       "      <td>青海师范大学民族师范学院学报</td>\n",
       "      <td>2021-06-09</td>\n",
       "      <td>期刊</td>\n",
       "      <td>NaN</td>\n",
       "      <td>58.0</td>\n",
       "      <td>下载</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>34</th>\n",
       "      <td>35</td>\n",
       "      <td>大统战格局下如何做好统战新闻舆论工作</td>\n",
       "      <td>孙金诚</td>\n",
       "      <td>中国新闻出版广电报</td>\n",
       "      <td>2021-06-09</td>\n",
       "      <td>报纸</td>\n",
       "      <td>NaN</td>\n",
       "      <td>3.0</td>\n",
       "      <td>下载</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>35</th>\n",
       "      <td>36</td>\n",
       "      <td>互联网时代下高校学生宣传队伍管理现状及思考——以四川大学锦城学院工商管理学院宣传中心为例</td>\n",
       "      <td>李雪婷</td>\n",
       "      <td>发明与创新(职业教育)</td>\n",
       "      <td>2021-06-09</td>\n",
       "      <td>期刊</td>\n",
       "      <td>NaN</td>\n",
       "      <td>5.0</td>\n",
       "      <td>下载</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>36</th>\n",
       "      <td>37</td>\n",
       "      <td>高校图书馆阅读推广工作中微信公众平台的应用分析</td>\n",
       "      <td>崔灵利</td>\n",
       "      <td>发明与创新(职业教育)</td>\n",
       "      <td>2021-06-09</td>\n",
       "      <td>期刊</td>\n",
       "      <td>NaN</td>\n",
       "      <td>3.0</td>\n",
       "      <td>下载</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>37</th>\n",
       "      <td>38</td>\n",
       "      <td>准确把握主题 讲好政协故事——省政协做好主题宣传工作</td>\n",
       "      <td>NaN</td>\n",
       "      <td>乡音</td>\n",
       "      <td>2021-06-09</td>\n",
       "      <td>期刊</td>\n",
       "      <td>NaN</td>\n",
       "      <td>1.0</td>\n",
       "      <td>下载</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>38</th>\n",
       "      <td>39</td>\n",
       "      <td>新媒体下的购物环境研究——以网店装修为例</td>\n",
       "      <td>王硕亦; 严薇; 江晓佳; 白丽娟</td>\n",
       "      <td>轻工科技</td>\n",
       "      <td>2021-06-08</td>\n",
       "      <td>期刊</td>\n",
       "      <td>NaN</td>\n",
       "      <td>46.0</td>\n",
       "      <td>下载</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>39</th>\n",
       "      <td>40</td>\n",
       "      <td>新媒体时代社会主义意识形态传播存在的问题及优化路径</td>\n",
       "      <td>李莎莎</td>\n",
       "      <td>品位·经典</td>\n",
       "      <td>2021-06-08</td>\n",
       "      <td>期刊</td>\n",
       "      <td>NaN</td>\n",
       "      <td>96.0</td>\n",
       "      <td>下载</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>40</th>\n",
       "      <td>41</td>\n",
       "      <td>新媒体时代高校形势与政策课教学存在的问题与对策</td>\n",
       "      <td>马春影</td>\n",
       "      <td>安徽广播电视大学学报</td>\n",
       "      <td>2021-06-08</td>\n",
       "      <td>期刊</td>\n",
       "      <td>NaN</td>\n",
       "      <td>23.0</td>\n",
       "      <td>下载</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>41</th>\n",
       "      <td>42</td>\n",
       "      <td>基于知识图谱的国内外移动政务研究对比分析</td>\n",
       "      <td>王谦; 雷鸿竹; 郭洁; 王丽</td>\n",
       "      <td>电子科技大学学报(社科版)</td>\n",
       "      <td>2021-06-08</td>\n",
       "      <td>期刊</td>\n",
       "      <td>NaN</td>\n",
       "      <td>19.0</td>\n",
       "      <td>下载</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>42</th>\n",
       "      <td>43</td>\n",
       "      <td>浅论融媒体时代行业性报纸的转型与发展</td>\n",
       "      <td>姜焕琴</td>\n",
       "      <td>中国矿业报</td>\n",
       "      <td>2021-06-08</td>\n",
       "      <td>报纸</td>\n",
       "      <td>NaN</td>\n",
       "      <td>20.0</td>\n",
       "      <td>下载</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>43</th>\n",
       "      <td>44</td>\n",
       "      <td>出版社做好新媒体营销工作的三点思考</td>\n",
       "      <td>董理</td>\n",
       "      <td>中国出版传媒商报</td>\n",
       "      <td>2021-06-08</td>\n",
       "      <td>报纸</td>\n",
       "      <td>NaN</td>\n",
       "      <td>9.0</td>\n",
       "      <td>下载</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>44</th>\n",
       "      <td>45</td>\n",
       "      <td>中医药文化传播的对策研究 网络首发</td>\n",
       "      <td>刘子宁; 项馨; 韩娟</td>\n",
       "      <td>中医临床研究</td>\n",
       "      <td>2021-06-07 14:41</td>\n",
       "      <td>期刊</td>\n",
       "      <td>NaN</td>\n",
       "      <td>32.0</td>\n",
       "      <td>下载</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>45</th>\n",
       "      <td>46</td>\n",
       "      <td>问题与回应:新媒体时代的政党形象建构</td>\n",
       "      <td>吴阳松</td>\n",
       "      <td>江汉论坛</td>\n",
       "      <td>2021-06-07</td>\n",
       "      <td>期刊</td>\n",
       "      <td>NaN</td>\n",
       "      <td>50.0</td>\n",
       "      <td>下载</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>46</th>\n",
       "      <td>47</td>\n",
       "      <td>教师教育惩戒权落实的理性思考</td>\n",
       "      <td>王飞</td>\n",
       "      <td>天津师范大学学报(基础教育版)</td>\n",
       "      <td>2021-06-07</td>\n",
       "      <td>期刊</td>\n",
       "      <td>NaN</td>\n",
       "      <td>77.0</td>\n",
       "      <td>下载</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>47</th>\n",
       "      <td>48</td>\n",
       "      <td>吕梁市县级融媒体中心发展建设探究</td>\n",
       "      <td>郭小芳</td>\n",
       "      <td>吕梁学院学报</td>\n",
       "      <td>2021-06-07</td>\n",
       "      <td>期刊</td>\n",
       "      <td>NaN</td>\n",
       "      <td>19.0</td>\n",
       "      <td>下载</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>48</th>\n",
       "      <td>49</td>\n",
       "      <td>龙祥科技强势打造特技车潮品</td>\n",
       "      <td>黄子婧</td>\n",
       "      <td>中外玩具制造</td>\n",
       "      <td>2021-06-07</td>\n",
       "      <td>期刊</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>下载</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>49</th>\n",
       "      <td>50</td>\n",
       "      <td>Trans‐Formations: Old Books as New Media</td>\n",
       "      <td>OUSHAKINE SERGUEI ALEX.</td>\n",
       "      <td>The Russian Review</td>\n",
       "      <td>2021-06-07</td>\n",
       "      <td>外文期刊</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "    Unnamed: 0                                            题名  \\\n",
       "0            1                               新媒体环境下和谐医患关系的构建   \n",
       "1            2                         传统文化元素融入品牌设计带来的价值提升研究   \n",
       "2            3    创新教育管理模式 提高体育教学质量——评《高校体育教学管理改革与模式构建》 网络首发   \n",
       "3            4                         基于个案学院学生党员主体意识培养的若干思考   \n",
       "4            5                 打造新媒体思政教育干部队伍 提升高校党建和思政教育工作成效   \n",
       "5            6               文化哲学视域下高校文化育人路径探索——基于00后大学生群体特点   \n",
       "6            7                             新媒体促进少先队员政治启蒙路径研究   \n",
       "7            8                     海南建设自由贸易港进程中维护意识形态安全的路径研究   \n",
       "8            9         “互联网+”背景下新媒体短视频对英语口语学习的影响研究——以抖音短视频为例   \n",
       "9           10                     新媒体环境下高校思想政治教育与学校体育多元发展研究   \n",
       "10          11             中职校企合作“课堂-工作室-实训基地”三位一体教学模式的研究与实践   \n",
       "11          12                            新媒体时代高校辅导员学生管理方法创新   \n",
       "12          13                          新冠疫情影响下高校招生宣传工作的应对之策   \n",
       "13          14                    高校大学生“宅”背景下思想政治教育工作开展方法的思考   \n",
       "14          15         新媒体视域下的高校图书馆信息服务——评《高校图书馆读者服务工作拓展与创新》   \n",
       "15          16   打破健康传播中的“无形之墙”——宿命论信念和信息传播对疫情中公众防护行为倾向的影响研究   \n",
       "16          17                             深度融合，探索“媒体+”的无限可能   \n",
       "17          18                     新媒体时代大学生社会主义核心价值观培育途径创新研究   \n",
       "18          19                      智慧课堂下课程思政体系建设的“三全育人”理性审视   \n",
       "19          20                          元媒介视角下新媒体评价分享功能的影响研究   \n",
       "20          21                             新媒体下平阳木版年画动态视觉化探究   \n",
       "21          22                             媒体融合背景下新闻宣传工作方式思考   \n",
       "22          23                                  基于新媒体的校园文化建设   \n",
       "23          24                    “互联网+”背景下图书出版与新媒体融合发展的路径探析   \n",
       "24          25                           新媒体视域下高校统战宣传工作的守正创新   \n",
       "25          26                              高校辅导员融媒体思政育人模式探究   \n",
       "26          27                      新媒体背景下高校辅导员与学生进行有效沟通方式探究   \n",
       "27          28                              新媒体环境下田径运动的可持续发展   \n",
       "28          29                               “文学经典，怎样影响你的人生”   \n",
       "29          30                        新媒体时代杨家埠木版年画的价值建构与传播创新   \n",
       "30          31                         谈新媒体环境下初中体育精神文化素养提升策略   \n",
       "31          32                       新媒体时代下高职院校体育文化建设发展的路径分析   \n",
       "32          33                            新媒体背景下企业视频营销技能提升策略   \n",
       "33          34                            5G时代下的群众文化活动传播推广思考   \n",
       "34          35                            大统战格局下如何做好统战新闻舆论工作   \n",
       "35          36  互联网时代下高校学生宣传队伍管理现状及思考——以四川大学锦城学院工商管理学院宣传中心为例   \n",
       "36          37                       高校图书馆阅读推广工作中微信公众平台的应用分析   \n",
       "37          38                    准确把握主题 讲好政协故事——省政协做好主题宣传工作   \n",
       "38          39                          新媒体下的购物环境研究——以网店装修为例   \n",
       "39          40                     新媒体时代社会主义意识形态传播存在的问题及优化路径   \n",
       "40          41                       新媒体时代高校形势与政策课教学存在的问题与对策   \n",
       "41          42                          基于知识图谱的国内外移动政务研究对比分析   \n",
       "42          43                            浅论融媒体时代行业性报纸的转型与发展   \n",
       "43          44                             出版社做好新媒体营销工作的三点思考   \n",
       "44          45                             中医药文化传播的对策研究 网络首发   \n",
       "45          46                            问题与回应:新媒体时代的政党形象建构   \n",
       "46          47                                教师教育惩戒权落实的理性思考   \n",
       "47          48                              吕梁市县级融媒体中心发展建设探究   \n",
       "48          49                                 龙祥科技强势打造特技车潮品   \n",
       "49          50      Trans‐Formations: Old Books as New Media   \n",
       "\n",
       "                         作者                  来源              发表时间   数据库  被引  \\\n",
       "0                    宋佳; 徐睿              现代商贸工业        2021-06-12    期刊 NaN   \n",
       "1                    邹云; 李桢                今古文创        2021-06-12    期刊 NaN   \n",
       "2                       杜晓兵            山西财经大学学报  2021-06-11 16:24    期刊 NaN   \n",
       "3                        沈耀             党史博采(下)        2021-06-11    期刊 NaN   \n",
       "4                       刘里卿             党史博采(下)        2021-06-11    期刊 NaN   \n",
       "5                       邓菁菁      黑龙江教育(高教研究与评估)        2021-06-11    期刊 NaN   \n",
       "6                       王丽娟              少年儿童研究        2021-06-11    期刊 NaN   \n",
       "7                  张北斗; 马文广              现代商贸工业        2021-06-11    期刊 NaN   \n",
       "8               邵玉杰; 关淼; 王琦              现代商贸工业        2021-06-11    期刊 NaN   \n",
       "9                       李佩明              现代商贸工业        2021-06-11    期刊 NaN   \n",
       "10                 李景娟; 张玉燕              现代商贸工业        2021-06-11    期刊 NaN   \n",
       "11                  刘芳源; 韩斌                 学周刊        2021-06-11    期刊 NaN   \n",
       "12                      冯杰梅            北京教育(高教)        2021-06-10    期刊 NaN   \n",
       "13                      陈阿娣          科学咨询(教育科研)        2021-06-10    期刊 NaN   \n",
       "14                  袁声莉; 徐玲              中国教育学刊        2021-06-10    期刊 NaN   \n",
       "15                   黎藜; 李孟                传媒观察        2021-06-10    期刊 NaN   \n",
       "16                 姜圣瑜; 刘晓来                传媒观察        2021-06-10    期刊 NaN   \n",
       "17                       辛勤         佳木斯大学社会科学学报        2021-06-10    期刊 NaN   \n",
       "18                   刘严; 黄波         佳木斯大学社会科学学报        2021-06-10    期刊 NaN   \n",
       "19                      宋佳欣                文化产业        2021-06-10    期刊 NaN   \n",
       "20                       朱烨                文化产业        2021-06-10    期刊 NaN   \n",
       "21                      张东波                文化产业        2021-06-10    期刊 NaN   \n",
       "22                      赵佳滨                文化产业        2021-06-10    期刊 NaN   \n",
       "23                       刘芳                文化产业        2021-06-10    期刊 NaN   \n",
       "24                 于喜彬; 程靖涵         发明与创新(职业教育)        2021-06-10    期刊 NaN   \n",
       "25                       赵萌         发明与创新(职业教育)        2021-06-10    期刊 NaN   \n",
       "26                      李雪婷         发明与创新(职业教育)        2021-06-10    期刊 NaN   \n",
       "27                      吴小铭                体育风尚        2021-06-10    期刊 NaN   \n",
       "28                      NaN          北京文学(精彩阅读)        2021-06-10    期刊 NaN   \n",
       "29                  王静; 于师号                  芒种        2021-06-10    期刊 NaN   \n",
       "30                       周磊                体育风尚        2021-06-10    期刊 NaN   \n",
       "31                       陈岳                体育风尚        2021-06-10    期刊 NaN   \n",
       "32                      杨晓飞        今日财富(中国知识产权)        2021-06-10    期刊 NaN   \n",
       "33                      王雅慧      青海师范大学民族师范学院学报        2021-06-09    期刊 NaN   \n",
       "34                      孙金诚           中国新闻出版广电报        2021-06-09    报纸 NaN   \n",
       "35                      李雪婷         发明与创新(职业教育)        2021-06-09    期刊 NaN   \n",
       "36                      崔灵利         发明与创新(职业教育)        2021-06-09    期刊 NaN   \n",
       "37                      NaN                  乡音        2021-06-09    期刊 NaN   \n",
       "38        王硕亦; 严薇; 江晓佳; 白丽娟                轻工科技        2021-06-08    期刊 NaN   \n",
       "39                      李莎莎               品位·经典        2021-06-08    期刊 NaN   \n",
       "40                      马春影          安徽广播电视大学学报        2021-06-08    期刊 NaN   \n",
       "41          王谦; 雷鸿竹; 郭洁; 王丽       电子科技大学学报(社科版)        2021-06-08    期刊 NaN   \n",
       "42                      姜焕琴               中国矿业报        2021-06-08    报纸 NaN   \n",
       "43                       董理            中国出版传媒商报        2021-06-08    报纸 NaN   \n",
       "44              刘子宁; 项馨; 韩娟              中医临床研究  2021-06-07 14:41    期刊 NaN   \n",
       "45                      吴阳松                江汉论坛        2021-06-07    期刊 NaN   \n",
       "46                       王飞     天津师范大学学报(基础教育版)        2021-06-07    期刊 NaN   \n",
       "47                      郭小芳              吕梁学院学报        2021-06-07    期刊 NaN   \n",
       "48                      黄子婧              中外玩具制造        2021-06-07    期刊 NaN   \n",
       "49  OUSHAKINE SERGUEI ALEX.  The Russian Review        2021-06-07  外文期刊 NaN   \n",
       "\n",
       "      下载   操作  \n",
       "0    NaN   下载  \n",
       "1    NaN   下载  \n",
       "2    NaN   下载  \n",
       "3    NaN   下载  \n",
       "4    NaN   下载  \n",
       "5    NaN   下载  \n",
       "6    NaN   下载  \n",
       "7    NaN   下载  \n",
       "8    NaN   下载  \n",
       "9    NaN   下载  \n",
       "10   NaN   下载  \n",
       "11   NaN   下载  \n",
       "12   NaN   下载  \n",
       "13   NaN   下载  \n",
       "14   NaN   下载  \n",
       "15   NaN   下载  \n",
       "16   NaN   下载  \n",
       "17   NaN   下载  \n",
       "18   NaN   下载  \n",
       "19   NaN   下载  \n",
       "20   NaN   下载  \n",
       "21   NaN   下载  \n",
       "22   NaN   下载  \n",
       "23   NaN   下载  \n",
       "24   NaN   下载  \n",
       "25   NaN   下载  \n",
       "26   NaN   下载  \n",
       "27   NaN   下载  \n",
       "28   NaN   下载  \n",
       "29   NaN   下载  \n",
       "30   NaN   下载  \n",
       "31   NaN   下载  \n",
       "32   NaN   下载  \n",
       "33  58.0   下载  \n",
       "34   3.0   下载  \n",
       "35   5.0   下载  \n",
       "36   3.0   下载  \n",
       "37   1.0   下载  \n",
       "38  46.0   下载  \n",
       "39  96.0   下载  \n",
       "40  23.0   下载  \n",
       "41  19.0   下载  \n",
       "42  20.0   下载  \n",
       "43   9.0   下载  \n",
       "44  32.0   下载  \n",
       "45  50.0   下载  \n",
       "46  77.0   下载  \n",
       "47  19.0   下载  \n",
       "48   NaN   下载  \n",
       "49   NaN  NaN  "
      ]
     },
     "execution_count": 17,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 查看页面信息\n",
    "element = driver.find_element_by_id('gridTable')\n",
    "page_html = element.get_attribute('innerHTML')\n",
    "page_html\n",
    "pd.read_html(page_html)[0]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 43,
   "metadata": {},
   "outputs": [],
   "source": [
    "# 全选文章\n",
    "element = driver.find_element_by_xpath('/html/body/div[3]/div[2]/div[2]/div[2]/form/div/div[1]/div[2]/div[1]/label/input')\n",
    "element.click()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 44,
   "metadata": {},
   "outputs": [],
   "source": [
    "# 选择导出\n",
    "element = driver.find_element_by_xpath('/html/body/div[3]/div[2]/div[2]/div[2]/form/div/div[1]/div[2]/ul[1]/li[2]/i')\n",
    "element.click()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 45,
   "metadata": {},
   "outputs": [],
   "source": [
    "# 选择导出格式\n",
    "element = driver.find_element_by_xpath('/html/body/div[3]/div[2]/div[2]/div[2]/form/div/div[1]/div[2]/ul[1]/li[2]/ul/li[1]/a')\n",
    "element.click()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 46,
   "metadata": {},
   "outputs": [],
   "source": [
    "# 选择refworks文件\n",
    "element = driver.find_element_by_xpath('/html/body/div[3]/div[2]/div[2]/div[2]/form/div/div[1]/div[2]/ul[1]/li[2]/ul/li[1]/ul/li[8]/a')\n",
    "element.click()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 41,
   "metadata": {},
   "outputs": [],
   "source": [
    "driver.switch_to.window(driver.window_handles[2])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 33,
   "metadata": {},
   "outputs": [],
   "source": [
    "# 批量导出\n",
    "element = driver.find_element_by_xpath('/html/body/div[3]/div/div[2]/div[1]/ul/li[3]/a')\n",
    "element.click()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# 翻页"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 70,
   "metadata": {},
   "outputs": [],
   "source": [
    "driver.find_element_by_id('PageNext').get_attribute('src')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 71,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "['/html/body/div[3]/div[2]/div[2]/div[2]/form/div/div[1]/div[2]/div[1]/label/input',\n",
       " '/html/body/div[3]/div[2]/div[2]/div[2]/form/div/div[1]/div[2]/ul[1]/li[2]/i',\n",
       " '/html/body/div[3]/div[2]/div[2]/div[2]/form/div/div[1]/div[2]/ul[1]/li[2]/ul/li[1]/a',\n",
       " '/html/body/div[3]/div[2]/div[2]/div[2]/form/div/div[1]/div[2]/ul[1]/li[2]/ul/li[1]/ul/li[8]/a']"
      ]
     },
     "execution_count": 71,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "piliang_list = []\n",
    "piliang_list.append(\"/html/body/div[3]/div[2]/div[2]/div[2]/form/div/div[1]/div[2]/div[1]/label/input\")\n",
    "piliang_list.append(\"/html/body/div[3]/div[2]/div[2]/div[2]/form/div/div[1]/div[2]/ul[1]/li[2]/i\")\n",
    "piliang_list.append(\"/html/body/div[3]/div[2]/div[2]/div[2]/form/div/div[1]/div[2]/ul[1]/li[2]/ul/li[1]/a\")\n",
    "piliang_list.append(\"/html/body/div[3]/div[2]/div[2]/div[2]/form/div/div[1]/div[2]/ul[1]/li[2]/ul/li[1]/ul/li[8]/a\")\n",
    "piliang_list"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 77,
   "metadata": {},
   "outputs": [],
   "source": [
    "for page in range(0,16):\n",
    "    for i in piliang_list:\n",
    "        element = driver.find_element_by_xpath(i)\n",
    "        element.click()\n",
    "        time.sleep(1)\n",
    "    driver.switch_to.window(driver.window_handles[2])\n",
    "    time.sleep(1)\n",
    "    element = driver.find_element_by_xpath('/html/body/div[3]/div/div[2]/div[1]/ul/li[3]/a')\n",
    "    element.click()\n",
    "    time.sleep(1)\n",
    "    driver.close()\n",
    "    driver.switch_to.window(driver.window_handles[1])\n",
    "    time.sleep(1)\n",
    "    element = driver.find_element_by_xpath('/html/body/div[3]/div[2]/div[2]/div[2]/form/div/div[1]/div[2]/div[1]/a')\n",
    "    element.click()\n",
    "    driver.find_element_by_xpath('//*[@id=\"PageNext\"]').click()\n",
    "    time.sleep(12)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "# for page in range(0,40):\n",
    "#     if driver.fine_element_by_id('changeVercode'):\n",
    "#         vercode = baidu_API_OCR()\n",
    "#         driver.fine_element_by_id('vericode').sent_keys(vercode)\n",
    "#         driver.fine_element_by_id('checkCodeBtn').click\n",
    "#     else:\n",
    "#         driver.find_element_by_xpath('//*[@id=\"PageNext\"]').click()\n",
    "#         time.sleep(2)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# 循环遍历的下载方法（具有实验性 可以单独自动化下载单个文章 但需要用百度api解决验证码 ）"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 114,
   "metadata": {},
   "outputs": [],
   "source": [
    "element = driver.find_element_by_xpath('//*[@id=\"gridTable\"]/table/tbody/tr/td[8]/a[1]/i')\n",
    "element.click()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 146,
   "metadata": {},
   "outputs": [],
   "source": [
    "xzl_list = []\n",
    "for i in range(1,5):\n",
    "    xz_xpath = '//*[@id=\"gridTable\"]/table/tbody/tr[{}]/td[8]/a[1]/i'.format(i)\n",
    "    xzl_list.append(xz_xpath)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 147,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "['//*[@id=\"gridTable\"]/table/tbody/tr[1]/td[8]/a[1]/i',\n",
       " '//*[@id=\"gridTable\"]/table/tbody/tr[2]/td[8]/a[1]/i',\n",
       " '//*[@id=\"gridTable\"]/table/tbody/tr[3]/td[8]/a[1]/i',\n",
       " '//*[@id=\"gridTable\"]/table/tbody/tr[4]/td[8]/a[1]/i']"
      ]
     },
     "execution_count": 147,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "xzl_list"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 148,
   "metadata": {},
   "outputs": [],
   "source": [
    "for z in xzl_list:\n",
    "    element = driver.find_element_by_xpath(z)\n",
    "    element.click()\n",
    "    time.sleep(2)"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.8.3"
  },
  "toc": {
   "base_numbering": 1,
   "nav_menu": {},
   "number_sections": true,
   "sideBar": true,
   "skip_h1_title": false,
   "title_cell": "Table of Contents",
   "title_sidebar": "Contents",
   "toc_cell": false,
   "toc_position": {},
   "toc_section_display": true,
   "toc_window_display": false
  }
 },
 "nbformat": 4,
 "nbformat_minor": 4
}
